package pkg

//Message 消息对象
type Message struct {
	pool map[int]string
}

//NewMessage 消息map
func NewMessage() *Message {
	i := &Message{
		pool: make(map[int]string),
	}
	i.pool[200] = "ok"
	i.pool[1000] = "error"
	i.pool[1001] = "Cannot ParseMultipartForm"
	i.pool[1002] = "MultipartForm not be empty"
	i.pool[1003] = "file not be empty"
	i.pool[1004] = ""
	i.pool[1005] = "name is not be empty"
	i.pool[1006] = "MultipartForm not be empty"
	return i
}

//Get 获取消息
func (p *Message) Get(code int) string {
	return p.pool[code]
}
